package com.spring.service.impl;

import com.spring.mapper.UserMapper;
import com.spring.pojo.Users;
import com.spring.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public void addUser(Users users) {
        userMapper.insertUser(users);
    }

    @Override
    public List<Users> listUser() {
        return userMapper.listUser();
    }

    @Override
    public Users login(Users users) {
        return userMapper.login(users);
    }

    @Override
    public void del(Integer id) {
        userMapper.del(id);
    }

    @Override
    public List<Users> list() {
        return userMapper.list();
    }
}
